package com.mo.tools.poi.watermark;

public class WatermarkExample {
    public static void main(String[] args) {
        try {
//
////             示例1：给Excel文件添加水印
//            String excelInput = "C:\\Users\\Administrator\\Downloads\\新建 Microsoft Word 文档.docx";
//            String excelOutput = "C:\\Users\\Administrator\\Downloads\\新建 Microsoft Word 文档_watermark.docx";
//            WatermarkUtil.addWatermark(excelInput, excelOutput, "DCS%2Fybm_\n0801001" + "\n2025-09-09 \n09:28:07");
////            // 示例3：自定义水印样式
//            String customInput = "C:\\Users\\Administrator\\Downloads\\新建 Microsoft Word 文档.docx";
//            String customOutput = "C:\\Users\\Administrator\\Downloads\\新建 Microsoft Word 文档_watermark_cus.docx";
//            WatermarkUtil.addWatermarkWithStyle(customInput, customOutput,
//                    "审核中", "宋体", 36, "#FF0000", 200, 200);
//
//            // 示例2：给Word文件添加水印
//            String wordInput = "C:\\Users\\Administrator\\Downloads\\订单激活效率明细表2025-10-151111111111111.xls";
//            String wordOutput = "C:\\Users\\Administrator\\Downloads\\订单激活效率明细表2025-10-151111111111111_watermark.xls";
//            WatermarkUtil.addWatermark(wordInput, wordOutput, "DCS%2Fybm_08010011111111111111"+ "\n2025-09-09 09:28:07");
//            WatermarkUtil.addWatermark(wordInput, wordOutput, "独守空房六九三零附近l-DCS%2Fybm_0801001-大家法律的激发了是");
//
//
//            // 示例3：自定义水印样式
//            String customInput1 = "C:\\Users\\Administrator\\Downloads\\生态周边激励结算2025-09-26待确认金额.xlsx";
//            String customOutput1 = "C:\\Users\\Administrator\\Downloads\\生态周边激励结算2025-09-26待确认金额_watermark_cus.xlsx";
//            WatermarkUtil.addWatermark(customInput1, customOutput1, "DCS%2Fybm_08010011111111111111"+ "\n2025-09-09 09:28:07");
//
//            WatermarkUtil.addWatermarkWithStyle(customInput1, customOutput1,
//                "审核中", "宋体", 36, "#FF0000", null, null);
//
//
//            // 示例1：给Excel文件添加水印
//            String excelInput1 = "D:\\Develop\\Files\\Idea\\brx-dcs\\brx-service\\brx-dcs-service\\src\\main\\resources\\word\\用户中心营业验收流程.pptx";
//            String excelOutput1 = "C:\\Users\\Administrator\\Downloads\\用户中心营业验收流程_watermark.pptx";
//            WatermarkUtil.addWatermark(excelInput1, excelOutput1, "DCS%2Fybm_\n0801001" + "\n2025-09-09 \n09:28:07");
//            // 示例1：给Excel文件添加水印
//            String excelInput3 = "D:\\Develop\\Files\\Idea\\brx-dcs\\brx-service\\brx-dcs-service\\src\\main\\resources\\word\\用户中心开业指引.ppt";
//            String excelOutput3 = "C:\\Users\\Administrator\\Downloads\\用户中心开业指引_watermark.ppt";
//            WatermarkUtil.addWatermark(excelInput3, excelOutput3, "DCS%2Fybm_0801001");


////             示例3：自定义水印样式
//            String customInput1 = "D:\\Develop\\Files\\Idea\\brx-dcs\\brx-service\\brx-dcs-service\\src\\main\\resources\\word\\AITO用户中心升级申请.doc";
//            String customOutput1 = "C:\\Users\\Administrator\\Downloads\\AITO用户中心升级申请.doc";
//            String customOutput2 = "C:\\Users\\Administrator\\Downloads\\AITO用户中心升级申请_cus.doc";
//            WatermarkUtil.addWatermark(customInput1, customOutput1, "DCS%2Fybm_08010011111111111111"+ "\n2025-09-09 09:28:07");

//            WatermarkUtil.addWatermarkWithStyle(customInput1, customOutput1,
//                "审核中", "宋体", 36, "#FF0000", null, null);

//             示例1：给Excel文件添加水印
            String excelInput4 = "D:\\Develop\\Files\\Idea\\brx-dcs\\brx-service\\brx-dcs-service\\src\\main\\resources\\word\\用户中心开业指引.ppt";
            String excelOutput4 = "C:\\Users\\Administrator\\Downloads\\用户中心开业指引_watermark_cus.ppt";
            WatermarkUtil.addWatermarkWithStyle(excelInput4, excelOutput4, "DCS%2Fybm_0801001——地煞地煞", "", 20, "#FF0000", null, null);

            String imgIn = "C:\\Users\\Administrator\\Desktop\\Tmp\\1.jpg";
            String imgOut = "C:\\Users\\Administrator\\Downloads\\1_mask.jpg";
            WatermarkUtil.addWatermark(imgIn, imgOut, "DCS%2Fybm_0801001");

            String imgIn2 = "C:\\Users\\Administrator\\Desktop\\Tmp\\2.jpeg";
            String imgOut2 = "C:\\Users\\Administrator\\Downloads\\2_mask.jpeg";
            WatermarkUtil.addWatermark(imgIn2, imgOut2, "DCS%2Fybm_0801001");

            String imgIn3 = "C:\\Users\\Administrator\\Desktop\\Tmp\\3.gif";
            String imgOut3 = "C:\\Users\\Administrator\\Downloads\\3_mask.gif";
            WatermarkUtil.addWatermark(imgIn3, imgOut3, "DCS%2Fybm_\n08010011111111111111"+ "\n2025-09-09 09:28:07");

            String imgIn4 = "C:\\Users\\Administrator\\Desktop\\Tmp\\4.png";
            String imgOut4 = "C:\\Users\\Administrator\\Downloads\\4_mask.png";
            WatermarkUtil.addWatermark(imgIn4, imgOut4, "DCS%2Fybm_\n08010011111111111111"+ "\n2025-09-09 09:28:07");

            String imgIn5 = "C:\\Users\\Administrator\\Desktop\\Tmp\\5.bmp";
            String imgOut5 = "C:\\Users\\Administrator\\Downloads\\5_mask.bmp";
            WatermarkUtil.addWatermark(imgIn5, imgOut5, "DCS%2Fybm_\n08010011111111111111"+ "\n2025-09-09 09:28:07");


            String imgIn6 = "C:\\Users\\Administrator\\Desktop\\Tmp\\6.tiff";
            String imgOut6 = "C:\\Users\\Administrator\\Downloads\\6_mask.tiff";
            WatermarkUtil.addWatermark(imgIn6, imgOut6, "DCS%2Fybm_\n08010011111111111111"+ "\n2025-09-09 09:28:07");

            String imgIn7 = "C:\\Users\\Administrator\\Desktop\\Tmp\\7.tif";
            String imgOut7 = "C:\\Users\\Administrator\\Downloads\\7_mask.tif";
            WatermarkUtil.addWatermark(imgIn7, imgOut7, "DCS%2Fybm_\n08010011111111111111"+ "\n2025-09-09 09:28:07");



        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}